/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.bookshop.exception;

import java.io.Serializable;
import javax.ejb.ApplicationException;

/**
 *
 * @author Thibault
 */
@ApplicationException(rollback = true)
public class EBookshopException extends RuntimeException implements Serializable {

    private int code = 0;
    
    public EBookshopException() {
        super();
    }

    public EBookshopException(String message) {
        super(message);
    }

    public EBookshopException(String message, Throwable cause) {
        super(message, cause);
    }

    public EBookshopException(Throwable cause) {
        super(cause);
    }
    
    public EBookshopException(String message, int code) {
        super(message);
        setCode(code);
    }
    
    public EBookshopException(Throwable cause, int code) {
        super(cause);
        setCode(code);
    }
    
    public EBookshopException(String message, Throwable cause, int code) {
        super(message, cause);
        setCode(code);
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }
    
}
